package demo1_binaryserach;

public class Test {
    public static void main(String[] args) {
        MyArray myArray = new MyArray();
        myArray.add(1);
        myArray.add(3);
        myArray.add(4);
        myArray.add(4);myArray.add(6);
        System.out.println( myArray.search(4));
        myArray.show();
        System.out.println(myArray.binarySearch(-99));
        System.out.println(myArray.binarySearch(99));
        System.out.println(myArray.binarySearch(2));
        System.out.println(myArray.binarySearch(5));
    }
}
